package com.rt.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rt.system.mapper.RtQuestionTypeMapper;
import com.rt.system.domain.RtQuestionType;
import com.rt.system.service.IRtQuestionTypeService;

/**
 * 题型Service业务层处理
 * 
 * @author Yg
 * @date 2022-04-13
 */
@Service
public class RtQuestionTypeServiceImpl implements IRtQuestionTypeService 
{
    @Autowired
    private RtQuestionTypeMapper rtQuestionTypeMapper;

    /**
     * 查询题型
     * 
     * @param id 题型主键
     * @return 题型
     */
    @Override
    public RtQuestionType selectRtQuestionTypeById(Long id)
    {
        return rtQuestionTypeMapper.selectRtQuestionTypeById(id);
    }

    /**
     * 查询题型列表
     * 
     * @param rtQuestionType 题型
     * @return 题型
     */
    @Override
    public List<RtQuestionType> selectRtQuestionTypeList(RtQuestionType rtQuestionType)
    {
        return rtQuestionTypeMapper.selectRtQuestionTypeList(rtQuestionType);
    }

    /**
     * 新增题型
     * 
     * @param rtQuestionType 题型
     * @return 结果
     */
    @Override
    public int insertRtQuestionType(RtQuestionType rtQuestionType)
    {
        return rtQuestionTypeMapper.insertRtQuestionType(rtQuestionType);
    }

    /**
     * 修改题型
     * 
     * @param rtQuestionType 题型
     * @return 结果
     */
    @Override
    public int updateRtQuestionType(RtQuestionType rtQuestionType)
    {
        return rtQuestionTypeMapper.updateRtQuestionType(rtQuestionType);
    }

    /**
     * 批量删除题型
     * 
     * @param ids 需要删除的题型主键
     * @return 结果
     */
    @Override
    public int deleteRtQuestionTypeByIds(Long[] ids)
    {
        return rtQuestionTypeMapper.deleteRtQuestionTypeByIds(ids);
    }

    /**
     * 删除题型信息
     * 
     * @param id 题型主键
     * @return 结果
     */
    @Override
    public int deleteRtQuestionTypeById(Long id)
    {
        return rtQuestionTypeMapper.deleteRtQuestionTypeById(id);
    }
}
